package com.bsj.power.common.def.entity.role;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @author yinhao
 * @version 1.0
 * @description 用户角色关联表
 * @date 2024/4/19
 */
@Data
@TableName("tab_user_role")
public class UserRole extends Model<UserRole> {

    /**
     * 用户ID
     */
    @TableId("user_id")
    @NotNull(message = "主键不能为空")
    private Long userId;

    /**
     * 角色id
     */
    @TableField("role_id")
    private Long roleId;
}
